package com.ucdb.postofacilwebservice.jdbc;


	import java.sql.Connection;
	import java.sql.DriverManager;
	import java.sql.SQLException;

	public class Conexao {

		/**
		 * Performs connection to the postgres dataBase 
		 * @return Connection Object type Connection
		 */
		public static Connection getConnection() {
		
			Connection connection = null;

			try{
				// Parametros: URL do banco, usuario e senha
				connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/postofacil", "postgres", "flyer1002");
				System.out.println("Successful Connection!");
				
			} catch (SQLException e){
				System.out.println("Can't connect dataBase " + e.getMessage());
			}
			 
			return connection;
		}
	}

